Administrator Guide 2017
Concepts - Report processing variables

Report processing variables are used to customise report processing, especially in relation to the text of e-mails and generation of file names. This means that entering “This is a report for ’ replaced with the actual customer name (eg Mr Smith) to generate the text "This is a report for Mr Smith" in the final report.

Report Processing Variables must have both a leading and trailing “%” (eg "" will NOT be correctly interpreted).

Fields which use Report Processing Variables can accept any number of them in any order with any number of iterations. Any text which is not recognized as a Report Processing Variable is left as-is (ie ").

Setting up a sequence calculated item type

Setting up a sequence calculated item type

CUSTOMER

The customer's current name. This is not backward compatible, so if the customer's name has changed since the form was filled in the new name will appear.

LOCATION

The customer's current location as selected on the device. This is not backward compatible, so if the location name has changed since the form was filled in the new name will appear.

DATE

This is a date/time stamp in the format YYYYMMDD"T"HHMMSS

SHORT_DATE

The date part of DATE: YYYYMMDD

YEAR

The year part of DATE: YYYY

MONTH

The month part of DATE: MM

WEEK_SUNDAY

The Sunday starting the week of DATE: YYYYMMDD

WEEK_MONDAY

The Monday starting the week of DATE: YYYYMMDD

GUID

The unique ID given to the report. For example, FD8DFE2D-33A7-4761-A1E8-4448DE4C1541

REPORT_URL

The full web link that points to the report

INSTALL_NAME

The name for this installation of magic5

CURRENT_DATE

The current date/time in the format YYYYMMDD"T"HHMMSS

CURRENT_SHORT_DATE

The date part of CURRENT_DATE: YYYYMMDD

CURRENT_YEAR

The year part of CURRENT_DATE: YYYY

CURRENT_MONTH

The month part of CURRENT_DATE: MM

CURRENT_WEEK_SUNDAY

The Sunday starting the week of CURRENT_DATE: YYYYMMDD

CURRENT_WEEK_MONDAY

The Sunday starting the week of CURRENT_DATE: YYYYMMDD

USERFULLNAME

The first and last name of the user completing the form

$customer

The customer name. This IS backward compatible and will display the customer name at the time the form was completed.

$location

The location. This IS backward compatible and will display the location at the time the form was completed.
Setting up a unique name for an item type

Setting up a unique name for an item type

@xxxx

The value of an item in the current template which has the unique name of "xxxx". Unique names are automatically allocated to all items in a template, but can be overwritten during set up to make them more meaningful. This report processing variable means that any data item on the device can be used in the corresponding action.

Further date formatting

In general you can control how the dates come out in server actions as follows:

Instead of using %@[unique name]%you can use %@[unique name]_Format_[dateformat]%

For example, instead of %@FromDate% you can use %@FromDate_Format_ddMMyy%

 

In this case, [dateformat] controls which parts of the date are shown.  For example, using dd MMM yyyy,

  • dd is the day, with a leading 0 if it’s before 10th
  • MMM is the month in a form like Apr
  • yyyy is the full year

Standard date formats include:

d: 15/6/2008
D: Sunday, June 15, 2008
f: Sunday, June 15, 2008 9:15 PM
F: Sunday, June 15, 2008 9:15:07 PM
g: 15/6/2008 9:15 PM
G: 15/6/2008 9:15:07 PM
m: June 15
o: 2008-06-15T21:15:07.0000000
R: Sun, 15 Jun 2008 21:15:07 GMT
s: 2008-06-15T21:15:07
t: 9:15 PM
T: 9:15:07 PM
u: 2008-06-15 21:15:07Z
U: Monday, June 16, 2008 4:15:07 AM
y: June, 2008

Sample dateformats include:

h:mm:ss.ff t = 9:15:07.00 P
MMM yyyy = 15 Jun 2008
HH:mm:ss.f = 21:15:07.0
dd MMM HH:mm:ss = 15 Jun 21:15:07
\Mon\t\h\: M = Month: 6
HH:mm:ss.ffffzzz = 21:15:07.0000-07:00

 

See Also

Templates

Job definitions